/*
 * File: J_la_T04_q1.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 23-Apr-2025 08:32:47
 */

/* Include Files */
#include "J_la_T04_q1.h"
#include <math.h>

/* Function Definitions */
/*
 * J_LA_T04_Q1
 *     U41 = J_LA_T04_Q1(IN1,IN2)
 *
 * Arguments    : const double in1[5]
 *                const double in2[5]
 *                double u41[16]
 * Return Type  : void
 */
void J_la_T04_q1(const double in1[5], const double in2[5], double u41[16])
{
  double t10;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t16;
  double t17;
  double t18;
  double t19;
  double t2;
  double t20;
  double t22;
  double t24;
  double t25;
  double t28;
  double t29;
  double t3;
  double t32;
  double t33;
  double t4;
  double t43;
  double t46;
  double t49;
  double t5;
  double t50;
  double t52;
  double t54;
  double t55;
  double t56;
  double t6;
  double t7;
  double t70;
  double t71;
  double t72;
  double t75;
  double t8;
  double t9;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     09-Apr-2025 18:11:45 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in2[3]);
  t6 = cos(in1[0]);
  t7 = cos(in1[1]);
  t8 = cos(in1[2]);
  t9 = cos(in1[3]);
  t10 = sin(in2[0]);
  t11 = sin(in2[1]);
  t12 = sin(in2[2]);
  t13 = sin(in2[3]);
  t14 = sin(in1[0]);
  t15 = sin(in1[1]);
  t16 = sin(in1[2]);
  t17 = sin(in1[3]);
  t18 = t7 * t14;
  t19 = t14 * t15;
  t75 = t2 * t6;
  t20 = t75 * t7;
  t22 = t4 * t6 * t11;
  t24 = t6 * t7 * t10;
  t46 = t3 * t6;
  t25 = t46 * t15;
  t28 = t2 * t4 * t11 * t14;
  t32 = t4 * t10 * t11 * t14;
  t50 = t2 * t3;
  t29 = t50 * t19;
  t3 *= t10;
  t33 = t3 * t19;
  t43 = t18 + t25;
  t46 = t19 + -(t46 * t7);
  t49 = t6 * t10 * t15 + t3 * t18;
  t50 = t75 * t15 + t50 * t18;
  t52 = t12 * t46;
  t3 = t24 + -t33;
  t54 = t20 + -t29;
  t55 = t12 * t50;
  t56 = t12 * t49;
  t70 = t28 + t55;
  t71 = t32 + t56;
  t7 = t4 * t8;
  t72 = (t6 * t8 * t11 * t12 + t16 * t43) + t7 * t46;
  t19 = t4 * t16;
  t4 = (t6 * t11 * t12 * t16 + -(t8 * t43)) + t19 * t46;
  t43 = (-(t8 * t10 * t11 * t12 * t14) + t16 * t3) + t7 * t49;
  t75 = (t10 * t11 * t12 * t14 * t16 + t8 * t3) + -(t19 * t49);
  t15 = (-(t2 * t8 * t11 * t12 * t14) + t16 * t54) + t7 * t50;
  t3 = (t2 * t11 * t12 * t14 * t16 + t8 * t54) + -(t19 * t50);
  t7 = t5 * t17;
  t19 = t13 * t17;
  t46 = t22 - t52;
  u41[0] = (t9 * t4 + t7 * t72) + t19 * t46;
  u41[1] = (t9 * t3 - t7 * t15) + t19 * t70;
  u41[2] = (t9 * t75 - t7 * t43) + t19 * t71;
  u41[3] = 0.0;
  t7 = t5 * t9;
  t19 = t9 * t13;
  u41[4] = (-t17 * t4 + t7 * t72) + t19 * t46;
  u41[5] = (-t17 * t3 - t7 * t15) + t19 * t70;
  u41[6] = (-t17 * t75 - t7 * t43) + t19 * t71;
  u41[7] = 0.0;
  u41[8] = -t13 * t72 + t5 * t46;
  u41[9] = t5 * t70 + t13 * t15;
  u41[10] = t5 * t71 + t13 * t43;
  u41[11] = 0.0;
  u41[12] = ((t18 * -0.01491 + t22 * 0.27898) - t25 * 0.01491) - t52 * 0.27898;
  u41[13] = ((t20 * 0.01491 + t28 * 0.27898) - t29 * 0.01491) + t55 * 0.27898;
  u41[14] = ((t24 * 0.01491 + t32 * 0.27898) - t33 * 0.01491) + t56 * 0.27898;
  u41[15] = 0.0;
}

/*
 * File trailer for J_la_T04_q1.c
 *
 * [EOF]
 */
